<div role="navigation" class="main-nav">
        <div class="navbar-header"> 
                <button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle" type="button">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                </button>
        </div>
<?php $get_params=$this->request->params['controller'].'/'.$this->request->params['action'].'/'.$params; 
$get_params_none=$this->request->params['controller'];?>
        <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav" id="main_nav">
                    <?php foreach($menus as $menu) {?>
                        <li class="<?php echo (!empty($this->params['action']) && ($get_params==$menu['Menu']['url'] || $get_params==$menu['Menu']['url'].'posts/index/' || $get_params_none==$menu['Menu']['url']) )?'active' :'' ?>"><a href="<?php echo $this->webroot.$menu['Menu']['url']; ?>"><?php echo $menu['Menu']['title']; ?></a></li>
                        
                    <?php } ?>
                </ul>
        </div>

<?php // print_r($products); 
?>
</div>